import requests
from bs4 import BeautifulSoup

path = 'nbzx.html'
url = 'http://www.nbzx.gov.cn/'

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ' +
                  'AppleWebKit/537.36 (KHTML, like Gecko) ' +
                  'Chrome/93.0.4577.82 Safari/537.36'
}
response = requests.get(url, headers=headers)
b_content = response.content
html = b_content.decode('utf-8')

bs = BeautifulSoup(html, "html5lib")
selection = bs.select_one('#slide_x > div.box > ul')
li_tags = selection.select('li')
for li in li_tags:
    attrs = {
        'href_attr': li.a['href'],
        'title_attr': li.a['title'],
        'src_attr': li.a.img['src'],
    }
    print(attrs)
